# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=poedit
pkgver=2.4.2
pkgrel=8
pkgdesc="cross-platform translations editor"
url="https://www.poedit.net"
arch="all"
license="MIT"
depends="gettext"
makedepends="boost-dev enchant2-dev gtk+3.0-dev gtkspell3-dev
	lucene++-dev wxgtk3-dev autoconf automake libtool pugixml-dev
	gettext-dev"
subpackages="$pkgname-lang $pkgname-doc"
source="https://github.com/vslavik/poedit/archive/v$pkgver-oss.tar.gz
	fix-missing-include.patch
	"
builddir="$srcdir/$pkgname-$pkgver-oss"

prepare() {
	default_prepare

	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--with-wx-config=wx-config-gtk3
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="03dc34835838f91358e9093634cf1a293b076f301c248a76ead26dc7446b4f4712a5079ac7116b3183f73e53681f920007abdada118318dadd4f17503ca4b078  v2.4.2-oss.tar.gz
4a03c13baa577a46a77b8b8c2ea13dbfeb4dc5313e39d2d8b12869a74be4ee396138aa3e2e29d57460dac53f2eee12ca7a22d471163482a1b87b211d2b5da85d  fix-missing-include.patch"
